//定义用户列表的约束
const mongoose = require("mongoose");
const baseModel = require('./baseModel')
const videolikeModel = new mongoose.Schema({
  content: {
    type: String,
    require: true,
  },
  video: { //点播视频id
    type: mongoose.ObjectId,
    require: true,
    ref:'Video'
  },
  user:{
    type:mongoose.ObjectId, //MongoDB 中的对象ID的类
    require:true,
    ref:'User' // 会将User中的表的_id返回给video表数据
  },
  ...baseModel
});
module.exports = videolikeModel;
